import React from 'react';
import { Pie } from '@ant-design/charts';

const DemoPie = () => {
  const data = [
    {
      type: '股权穿透效率',
      value: 98.78,
    },
    {
      type: '',
      value: 0.22,
    },
  ];
  const config = {
    data,
    angleField: 'value',
    colorField: 'type',
    radius: 1,
    label: false,
    innerRadius: 0.8,
    legend: false,
    statistic: {
      title: { content: '控制权计算准确度', style: { fontSize: '18spx', marginTop: '-5px' } },
      content: {
        content: '89%',
        style: {
          fontSize: '22px',
          marginTop: '5px',
          fontWeight: 'bold',
          backgroundColor: 'rgba(0,0,0,0)',
        },
      },
    },
    color: '#722ED1',
  };
  return <Pie {...config} />;
};

export default DemoPie;
